package com.eboss2.sbs.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.TextView;

import com.eboss2.sbs.R;
import com.eboss2.sbs.activity.base.BaseActivity;
import com.mytools.tool.activityManager.MyActivityManager;
import com.tool.utils.utils.LogUtils;
import com.tool.utils.utils.ToastUtils;
import com.tool.utils.utils.UtilPreference;
import com.tool.utils.view.AbSlidingButton;
import com.tool.utils.view.ToggleButton;

public class MyDeviceFunctionActivity extends BaseActivity implements View.OnClickListener{


	private ToggleButton itemsCheck1;
	private ToggleButton itemsCheck2;
	private ToggleButton itemsCheck3;


	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		mContext = this;
		setContentView(R.layout.activity_my_device_function);
		MyActivityManager.getInstance().addActivity(this);
		initView();
	}
	
	private void initView(){
		showView(R.id.titleback_btn_back, true);
		setTvText(R.id.tv_title, "POS机收款功能");
		showView(R.id.next_sure, false);
		findViewById(R.id.titleback_btn_back).setOnClickListener(this);

		itemsCheck1 = findViewById(R.id.mSliderBtn1);
		itemsCheck1.setOpen(true);
		itemsCheck1.setOnToggleListener(new ToggleButton.OnToggleListener() {
			@Override
			public void onToggle(boolean isOpen) {

				toast(isOpen ? "开关" : "关闭");

			}
		});

		itemsCheck2 = findViewById(R.id.mSliderBtn2);
		itemsCheck2.setOpen(true);
		itemsCheck2.setOnToggleListener(new ToggleButton.OnToggleListener() {
			@Override
			public void onToggle(boolean isOpen) {
				toast(isOpen ? "开关" : "关闭");
			}
		});

		itemsCheck3 = findViewById(R.id.mSliderBtn3);
		itemsCheck3.setOpen(true);
		itemsCheck3.setOnToggleListener(new ToggleButton.OnToggleListener() {
			@Override
			public void onToggle(boolean isOpen) {
				toast(isOpen ? "开关" : "关闭");
			}
		});

	}





	
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
			case R.id.titleback_btn_back:
				finish();
				break;
			default:break;
		}
	}

	
}
